package cn.wolfcode.mapper;

import cn.wolfcode.domain.Exam;
import cn.wolfcode.domain.Question;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExamMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Exam record);

    Exam selectByPrimaryKey(Long id);

    List<Exam> selectAll();

    int updateByPrimaryKey(Exam record);

    List<Exam> selectForList(QueryObject qo);

    List<Long> selectOneChoice(@Param("oneChoiceNum") Integer oneChoiceNum);
    List<Long> selectManyChoice(@Param("manyChoiceNum") Integer ManyChoiceNum);
    List<Long> selectJudge(@Param("judgeNum") Integer judgeNum);

    void saveExam2Question(@Param("id") Long id, @Param("topicId") Long topicId, @Param("count") Integer count, @Param("score") Integer score);

   /* List<Object> selectExamPage(Long id);*/

    List<Question> selectOneList(@Param("id") Long id, @Param("type") int type);
}